package com.powerhua.privilege.dao;

import java.util.List;

import org.springframework.dao.DataAccessException;

import com.powerhua.privilege.domain.User;

public interface UserDao {
	
	// ===============
	// login
	// ===============
	
	/**
	 * 
	 * @param userName
	 * @param userPassword
	 * @return
	 * @throws DataAccessException
	 */
	boolean loginCheck(String userName, String userPassword) throws DataAccessException;

	// ===============
	// GUID
	// ===============
	
	/**
	 * 
	 * @param userId
	 * @return
	 * @throws DataAccessException
	 */
	public User findUserById(String userId) throws DataAccessException;

	/**
	 * 
	 * @param user
	 * @return
	 * @throws DataAccessException
	 */
	public int insertUser(User user) throws DataAccessException;

	/**
	 * 
	 * @param user
	 * @return
	 * @throws DataAccessException
	 */
	public int updateUser(User user) throws DataAccessException;

	/**
	 * 
	 * @param user
	 * @return
	 * @throws DataAccessException
	 */
	public int deleteUser(User user) throws DataAccessException;

	/**
	 * 
	 * @param start
	 * @param offset
	 * @return
	 * @throws DataAccessException
	 */
	public List getUserList(int start, int offset) throws DataAccessException;
	
	
	// ======================
	// manager
	// ======================
}
